# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=appstream-generator
pkgver=0.8.2
pkgrel=0
pkgdesc="A fast AppStream metadata generator"
url="https://github.com/ximion/appstream-generator"
arch="x86 x86_64 aarch64" # ldc
license="LGPL-3.0-or-later"
makedepends="meson ldc ldc-runtime appstream-dev libarchive-dev gir-to-d
	cairo-dev gdk-pixbuf-dev librsvg-dev freetype-dev fontconfig-dev
	pango-dev yarn lmdb-dev glibd-dev libsoup-dev gobject-introspection-dev
	coreutils" # needs cp with preserve-ownership
subpackages="$pkgname-doc"
source="https://github.com/ximion/appstream-generator/archive/v$pkgver/appstream-generator-$pkgver.tar.gz"

build() {
	meson \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--buildtype=plain \
		. output
	ninja -C output
}

check() {
	ninja -C output test
}

package() {
	DESTDIR="$pkgdir" ninja -C output install
}

sha512sums="fb5264817f54da80e4baa51624e1c9fa9cb0c85a6115211adb8fc2918755477d12e519185173c532404f200eabacf77d61d05266980b6fca11378ca7153d2b4e  appstream-generator-0.8.2.tar.gz"
